<?php 
    namespace Home\Model;
    use Think\Model;
    class NoticeModel extends Model{
        //自动完成
        protected $_auto = array ( 
            array('naddtime','time',3,'function'),  
      
        );
    
    //自动验证
        protected $_validate = array(
          array('ntitle','require','标题不能为空',0,'regex',3),
          array('ntitle','1,16','你的标题太长了',1,'length',3),
          array('ncontent','1,120','你的内容太长了',1,'length',3),
        );
    }